<template>
  <div>
    <van-row>
      <van-col span="4">
        <left_s/>
      </van-col>
      <van-col span="20">
        <van-row>
          <van-col span="24">
            <head_s/>
          </van-col>
        </van-row>
        <van-row>
          <van-uploader :after-read="uploader">
            <van-uploader>
              <van-button icon="plus" type="primary">导入文件</van-button>
            </van-uploader>
          </van-uploader>
        </van-row>
      </van-col>
    </van-row>
  </div>
</template>

<script>
import head_s from "@/components/head_s";
import left_s from "@/components/left_s";
// import axios from "@/http/axios"
import axios from 'axios'

export default {
  name: "com",
  components: {
    'head_s': head_s,
    'left_s': left_s
  },
  methods: {
    uploader(file) {
      let formData = new FormData()
      formData.append('file', file.file)
      axios({url: '/upload', method: 'post', data: formData}).then(res => {
        console.log(res)
      })
    }
  }
}
</script>

<style scoped>

</style>